<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no,minimal-ui">
	<title>店铺详情</title>
	<link rel="stylesheet" type="text/css" href="../addons/zh_yjm/template/mobile/css/index.css">
	<link rel="stylesheet" type="text/css" href="../addons/zh_yjm/template/mobile/css/jquery-weui.css">
	<link rel="stylesheet" type="text/css" href="../addons/zh_yjm/template/mobile/css/weui.min.css"> 

	<style type="text/css">
	iframe{
		position: fixed;
		bottom: 0;
		left: 0;
		background: #fff;
		z-index: 999;	
	}
	.banner img{
		width: 100%;
		height: 100%;
	}
	.footer a:hover{
			color: red;
		}

		.weui-navbar{
			background: none!important;
			font-size: 1.4rem;
			line-height: 1.8rem;
		}
		.weui-navbar__item:active , .weui-navbar__item , .weui-bar__item--on ,  .weui-navbar__item , .weui-navbar:after , .weui-navbar__item:after{
			background: none!important;
			border: none;
			font-size: 1.4rem;
			padding: 0;
			line-height: 3.2rem;
			color: #333;
		}

		 .weui-navbar__item span{
		 	font-size: 1.4rem;
		 	display: inline-block;
		 	line-height: 3.2rem;
		 }
		.weui-bar__item--on span{
			 font-size: 1.4rem;
			color: red;
			border-bottom: 0.1rem solid red;
			background: none;
		}
		.weui-tab__bd-item {
			margin-top: 2rem;
			width: 94%;
			padding: 0 3%;
		}
		.weui-tab__bd div{
			font-size: 1.4rem;
			line-height: 2.2rem;
		}
		.weui-tab__bd div img{
			width: 100%;
			height: auto;
		}
		.footer{
      width: 100%;
      overflow: hidden;
      display: flex;
      height: 6rem;
      padding: 1rem 0;
      border-top: 0.05rem solid #ccc;
      position: fixed;
      bottom: 0;
      left: 0;
    }
    .footer a{
      float: left;
      display: block;
      /*width: 33%;*/
      color: #333;
      text-align: center;
      text-decoration: none;
    }
    .footer a img{
      display: inline-block;
      width:3rem;
      height:3rem;
    }
    .footer a p{
      text-align: center;
      font-size: 1.5rem;
      line-height: 3.8rem;
      margin:0;
    }

    .footer a:hover , .footer a:active{
      color: red;
    }
	</style>
</head>
<body>
	<div class="banner">
		
		<div class="swiper-container" id="swiper-container" style="height: 18rem;">

	      	<div class="swiper-wrapper" >
			    <!-- <div class="swiper-slide"><img src="https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1656562954,584009141&fm=11&gp=0.jpg" alt=""></div>
			    <div class="swiper-slide"><img src="https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1932490921,515120803&fm=11&gp=0.jpg" alt=""></div> -->
	      	</div>

	      	<div class="swiper-pagination"></div>

	    </div>	
	</div>


	<div class="info" >
		<h2>志汇科技美容店</h2>

		<div class="info_list">
			<p class="info_left phone">电话：</p>

			<a class="call">点击拨打</a>
		</div>

		<div class="info_list">
			<p class="info_left area">地址：湖北省武汉市洪山区群光广场</p>

			<a class="gps">点击导航</a>
		</div>
	</div>


	<div class="weui-tab">
	  <div class="weui-navbar" style="border-bottom: 0.05rem solid #bbb;">
	    <a class="weui-navbar__item weui-bar__item--on" href="#tab1">
	      <span>门店介绍</span>
	    </a>
	    <a class="weui-navbar__item" href="#tab2">
	      <span>活动规则</span>
	    </a>
	  </div>
	  <div class="weui-tab__bd">
	    <div id="tab1" class="weui-tab__bd-item weui-tab__bd-item--active">
	    	
	    </div>


	    <div id="tab2" class="weui-tab__bd-item">
	      
	    </div>
	  </div>
	</div>

	<!-- <iframe name="iframe2" MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no src="../addons/zh_yjm/template/mobile/footer.html" height="auto" width="100%"></iframe> -->
	<div class="footer" id="footer" style="background-color:#fff;" >
    {loop $menus $row}
      <a {if $total==2}style="width:50%"{/if}  {if $total==3}style="width:33%"{/if}   {if $total==4}style="width:25%"{/if}   {if $total==5}style="width:20%"{/if} href="{$row['link']}">
        <img src="{$_W['attachurl']}{$row['img']}">
        <p>{$row['title']}</p>
      </a>
    {/loop}
  </div>
</body>
<script type="text/javascript" src='../addons/zh_yjm/template/mobile/js/jquery-2.1.4.js'></script>
<script src='../addons/zh_yjm/template/mobile/js/swiper.js'></script>
<script type="text/javascript" src='../addons/zh_yjm/template/mobile/js/index.js'></script>
<script type="text/javascript" src='../addons/zh_yjm/template/mobile/js/jquery-weui.js'></script>
<script type="text/javascript" src='../addons/zh_yjm/template/mobile/js/jquery-weui.min.js'></script>

<script type="text/javascript">




	$(function () {
		

		var url=window.location.href;
     
        console.log(url);
        url=url.toString();
        var array=url.split("&id=");
        var id=array[1]
        console.log(id)
        $.ajax({
            type:"get",
            url:"{$_W['siteroot']}app/index.php?i={$_W['uniacid']}&c=entry&a=site&do=Storedetail&m=zh_yjm",
            async:true,
            dataType:"json",
            data:{id:id},
            success:function(data){
            	console.log(data)
            	var latlngarr=[30, 114];
            	data.data.imgs=data.data.imgs.split(",")
            	data.data.latlng=data.data.latlng.split(",")
            	latlngarr[0]=data.data.latlng[1]
            	latlngarr[1]=data.data.latlng[0]
            	console.log(data.data.imgs)
            	for(var i=0;i<data.data.imgs.length;i++){
            		var arr="<div class='swiper-slide'><img src='{$_W['siteroot']}/attachment/"+data.data.imgs[i]+"'></div>"
            	$(".swiper-wrapper").append(arr)

            	}
		           $(".swiper-container").swiper({

			        loop: true,

			        autoplay: 3000,

			      });
            	
               $(".phone").html("电话："+data.data.phone)
               $(".call").attr("href","tel:"+data.data.phone)
               $(".area").html("地址："+data.data.area)
               $("#tab1").html(data.data.detail)
               $("#tab2").html(data.data.rule)
               $(".gps").attr("href", "https://uri.amap.com/marker?position="+latlngarr+"&name="+data.data.area)
               // $(".gps").attr("href", "http://api.map.baidu.com/marker?location="+data.data.latlng+"&title="+data.data.area)
            },

            error : function(data) {

                alert(data.msg);

                return false

            }
        })
	})
</script>

</html>